package jenum.com;

/**
 * Created by as on 2016/11/17.
 */
public class TryCatchFinally {
    public static void main(String[] args)
    {
        try {
            String[] bookName = {"java程序设计", "java web 基础知识"};
            System.out.println(bookName[2] + ",");
            System.out.println("这是一本好书");
        }catch(ArrayIndexOutOfBoundsException e){
            System.out.println("索引越界了");
        }
        catch(Exception e){
            System.out.print("异常事件");
        }
        finally {
            System.out.println("一定会被执行");
        }
        System.out.println("已处理。。。");
    }
}
